package com.zdsoft.finance.meet.entity;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.CascadeType;
import org.hibernate.annotations.LazyCollection;
import org.hibernate.annotations.LazyCollectionOption;

import com.zdsoft.finance.project.entity.Project;
import com.zdsoft.framework.core.common.domain.BaseEntity;

/**
 * 参会项目
 * 
 * @author liuwei
 *
 */
@Entity
@Table(name = "ZDS_MEETING_PROJECT")
public class MeetingProject extends BaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 7025979730257198073L;

	/**
	 * 流程业务Id
	 */
	@Column(length = 32)
	private String businessId;

	/**
	 * 终止投票时间
	 */
	@Column
	private Long endVoteDateTime;

	/**
	 * 终止投票原因
	 */
	@Lob
	private String endVoteReason;

	/**
	 * 终止者Id
	 */
	@Column(length = 32)
	private String endvoteEmpId;

	/**
	 * 终止者姓名
	 */
	@Column(length = 32)
	private String endVoteEmpName;

	/**
	 * 发起上会时间
	 */
	@Column
	private Long launchDateTime;

	/**
	 * 上会类型
	 */
	@Column(length = 32)
	private String meetType;

	/**
	 * 纪要Id
	 */
	@Column(length = 32)
	private String minutesId;

	/**
	 * 出具会议纪要URL
	 */
	@Column(length = 256)
	private String minutesUrl;

	/**
	 * 出具会议纪要系统代码
	 */
	@Column(length = 128)
	private String minutesUrlAppCode;

	/**
	 * 出具会议纪要资源
	 */
	@Column(length = 128)
	private String minutesUrlukey;

	/**
	 * 项目信息URL
	 */
	@Column(length = 256)
	private String proMsgUrl;

	/**
	 * 项目信息系统代码
	 */
	@Column(length = 128)
	private String proUrlAppCode;

	/**
	 * 项目信息系统资源
	 */
	@Column(length = 256)
	private String proUrlukey;

	/**
	 * 拒绝上会时间
	 */
	@Column
	private Long refuseDateTime;

	/**
	 * 拒绝上会原因
	 */
	@Lob
	private String refuseReason;

	/**
	 * 拒绝上会者id
	 */
	@Column(length = 32)
	private String refuseEmpId;

	/**
	 * 拒绝上会者姓名
	 */
	@Column(length = 32)
	private String refuseEmpName;

	/**
	 * 过会结论
	 */
	@Column
	private Integer reviewResult;

	/**
	 * 上会项目状态
	 */
	@Column
	private Integer state;

	/**
	 * 上会结束时间
	 */
	@Column
	private Long endDateTime;

	/**
	 * 项目
	 */
	@ManyToOne
	private Project project;

	/**
	 * 会议
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	@Cascade({ CascadeType.ALL })
	private Meeting meeting;

	/**
	 * 参会委员
	 */
	@OneToMany(mappedBy = "meetingProject")
	@LazyCollection(LazyCollectionOption.TRUE)
	@Cascade({ CascadeType.ALL })
	private List<MeetingMember> meetingMembers;

	public String getBusinessId() {
		return businessId;
	}

	public void setBusinessId(String businessId) {
		this.businessId = businessId;
	}

	public Long getEndVoteDateTime() {
		return endVoteDateTime;
	}

	public void setEndVoteDateTime(Long endVoteDateTime) {
		this.endVoteDateTime = endVoteDateTime;
	}

	public String getEndVoteReason() {
		return endVoteReason;
	}

	public void setEndVoteReason(String endVoteReason) {
		this.endVoteReason = endVoteReason;
	}

	public String getEndvoteEmpId() {
		return endvoteEmpId;
	}

	public void setEndvoteEmpId(String endvoteEmpId) {
		this.endvoteEmpId = endvoteEmpId;
	}

	public String getEndVoteEmpName() {
		return endVoteEmpName;
	}

	public void setEndVoteEmpName(String endVoteEmpName) {
		this.endVoteEmpName = endVoteEmpName;
	}

	public Long getLaunchDateTime() {
		return launchDateTime;
	}

	public void setLaunchDateTime(Long launchDateTime) {
		this.launchDateTime = launchDateTime;
	}

	public String getMeetType() {
		return meetType;
	}

	public void setMeetType(String meetType) {
		this.meetType = meetType;
	}

	public String getMinutesId() {
		return minutesId;
	}

	public void setMinutesId(String minutesId) {
		this.minutesId = minutesId;
	}

	public String getMinutesUrl() {
		return minutesUrl;
	}

	public void setMinutesUrl(String minutesUrl) {
		this.minutesUrl = minutesUrl;
	}

	public String getMinutesUrlAppCode() {
		return minutesUrlAppCode;
	}

	public void setMinutesUrlAppCode(String minutesUrlAppCode) {
		this.minutesUrlAppCode = minutesUrlAppCode;
	}

	public String getMinutesUrlukey() {
		return minutesUrlukey;
	}

	public void setMinutesUrlukey(String minutesUrlukey) {
		this.minutesUrlukey = minutesUrlukey;
	}

	public String getProMsgUrl() {
		return proMsgUrl;
	}

	public void setProMsgUrl(String proMsgUrl) {
		this.proMsgUrl = proMsgUrl;
	}

	public String getProUrlAppCode() {
		return proUrlAppCode;
	}

	public void setProUrlAppCode(String proUrlAppCode) {
		this.proUrlAppCode = proUrlAppCode;
	}

	public String getProUrlukey() {
		return proUrlukey;
	}

	public void setProUrlukey(String proUrlukey) {
		this.proUrlukey = proUrlukey;
	}

	public Long getRefuseDateTime() {
		return refuseDateTime;
	}

	public void setRefuseDateTime(Long refuseDateTime) {
		this.refuseDateTime = refuseDateTime;
	}

	public String getRefuseReason() {
		return refuseReason;
	}

	public void setRefuseReason(String refuseReason) {
		this.refuseReason = refuseReason;
	}

	public String getRefuseEmpId() {
		return refuseEmpId;
	}

	public void setRefuseEmpId(String refuseEmpId) {
		this.refuseEmpId = refuseEmpId;
	}

	public String getRefuseEmpName() {
		return refuseEmpName;
	}

	public void setRefuseEmpName(String refuseEmpName) {
		this.refuseEmpName = refuseEmpName;
	}

	public Integer getReviewResult() {
		return reviewResult;
	}

	public void setReviewResult(Integer reviewResult) {
		this.reviewResult = reviewResult;
	}

	public Integer getState() {
		return state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	public Long getEndDateTime() {
		return endDateTime;
	}

	public void setEndDateTime(Long endDateTime) {
		this.endDateTime = endDateTime;
	}

	public Project getProject() {
		return project;
	}

	public void setProject(Project project) {
		this.project = project;
	}

	public Meeting getMeeting() {
		return meeting;
	}

	public void setMeeting(Meeting meeting) {
		this.meeting = meeting;
	}

	public List<MeetingMember> getMeetingMembers() {
		return meetingMembers;
	}

	public void setMeetingMembers(List<MeetingMember> meetingMembers) {
		this.meetingMembers = meetingMembers;
	}

}
